package com.ruoyi.project.search.viewoutfinish.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.search.viewoutfinish.mapper.ViewOutFinishMapper;
import com.ruoyi.project.search.viewoutfinish.domain.ViewOutFinish;
import com.ruoyi.project.search.viewoutfinish.service.IViewOutFinishService;
import com.ruoyi.common.core.text.Convert;

/**
 * 出库单据历史Service业务层处理
 * 
 * @author wld
 * @date 2023-04-12
 */
@Service
public class ViewOutFinishServiceImpl implements IViewOutFinishService 
{
    @Autowired
    private ViewOutFinishMapper viewOutFinishMapper;

    /**
     * 查询出库单据历史
     * 
     * @param stockoutId 出库单据历史主键
     * @return 出库单据历史
     */
    @Override
    public ViewOutFinish selectViewOutFinishByStockoutId(String stockoutId)
    {
        return viewOutFinishMapper.selectViewOutFinishByStockoutId(stockoutId);
    }

    /**
     * 查询出库单据历史列表
     * 
     * @param viewOutFinish 出库单据历史
     * @return 出库单据历史
     */
    @Override
    public List<ViewOutFinish> selectViewOutFinishList(ViewOutFinish viewOutFinish)
    {
        return viewOutFinishMapper.selectViewOutFinishList(viewOutFinish);
    }

    /**
     * 新增出库单据历史
     * 
     * @param viewOutFinish 出库单据历史
     * @return 结果
     */
    @Override
    public int insertViewOutFinish(ViewOutFinish viewOutFinish)
    {
        return viewOutFinishMapper.insertViewOutFinish(viewOutFinish);
    }

    /**
     * 修改出库单据历史
     * 
     * @param viewOutFinish 出库单据历史
     * @return 结果
     */
    @Override
    public int updateViewOutFinish(ViewOutFinish viewOutFinish)
    {
        return viewOutFinishMapper.updateViewOutFinish(viewOutFinish);
    }

    /**
     * 批量删除出库单据历史
     * 
     * @param stockoutIds 需要删除的出库单据历史主键
     * @return 结果
     */
    @Override
    public int deleteViewOutFinishByStockoutIds(String stockoutIds)
    {
        return viewOutFinishMapper.deleteViewOutFinishByStockoutIds(Convert.toStrArray(stockoutIds));
    }

    /**
     * 删除出库单据历史信息
     * 
     * @param stockoutId 出库单据历史主键
     * @return 结果
     */
    @Override
    public int deleteViewOutFinishByStockoutId(String stockoutId)
    {
        return viewOutFinishMapper.deleteViewOutFinishByStockoutId(stockoutId);
    }
}
